package com.nuanshui.heatedloan.credit.dal.mapper;

import com.nuanshui.heatedloan.credit.model.ZeroDayInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * Created by wangxw on 2017/7/15.
 */
public interface ZeroDayInfoMapper {

    /***
     * 根据用户id和产品类型获取置零天数
     * @param userId
     * @param type
     * @return
     */
    ZeroDayInfo getZeroDayInfoByUserIdAndType(@Param("userId") String userId, @Param("borrowType") int borrowType);


    /***
     * 更新置零天数
     * @param userId
     * @param borrowType
     */
    void updateZeroDayInfoByUserIdAndType(@Param("userId") String userId,
                                          @Param("borrowType") int borrowType, @Param("day") int day, @Param("date") Date date);


    /***
     * 插入置零更新天数
     * @param zeroDayInfo
     */
    void insertZeroDayInfoByUserIdAndType(ZeroDayInfo zeroDayInfo);
}
